package com.multimedia.controller;

import com.multimedia.pojo.User;

import javax.servlet.http.HttpServletRequest;

public class BaseController {
    protected User getSessionUser(HttpServletRequest request) {
        User user = (User)request.getSession().getAttribute("user");
        return user;
    }


    protected void setSessionUser(HttpServletRequest request, User user) {
        request.getSession().setAttribute("user",
                user);
    }

}
